import { Canvas, Story } from '@storybook/addon-docs'
import LinkTo from '@storybook/addon-links/react'

# onNavigate

- type: `function`
- controls: <LinkTo kind="props" story="date">date</LinkTo>
- example: `(newDate) => setDate(newDate)`

Callback fired when the `date` value changes. When included it is used to 'control' the <LinkTo kind="props" story="date">date</LinkTo> prop value.

<Canvas>
  <Story id="props--on-navigate" />
</Canvas>
